/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
}

body {
    background-color: #f5f7fa;
}

/* 顶部导航栏 */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #2f4050;
    color: #fff;
    padding: 0 20px;
    height: 50px;
}

.topbar-left .system-title {
    font-size: 18px;
    color: #1890ff; /* 青蓝色突出 */
    text-decoration: none;
}

.topbar-middle a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

.topbar-middle a:hover {
    color: #1890ff;
}

.topbar-right {
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.user-info img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
}

.user-info .username {
    font-size: 14px;
}

.logout-btn {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s;
}

.logout-btn:hover {
    color: #f4645f; /* 红色突出 */
}

/* 侧边栏容器 */
.sidebar {
    width: 220px;
    height: calc(100vh - 50px); /* 减去顶部栏高度 */
    background-color: #2f4050;
    color: #fff;
    position: fixed;
    left: 0;
    top: 50px;
    overflow-y: auto;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li {
    position: relative;
}

.parent-menu {
    display: block;
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.parent-menu:hover {
    background-color: #1f2d3d;
}

.submenu {
    display: none;
    background-color: #1f2d3d;
    padding-left: 20px;
}

.submenu li a {
    display: block;
    padding: 10px 0;
    color: #b3c0cd;
    text-decoration: none;
    transition: color 0.3s;
}

.submenu li a:hover {
    color: #1890ff;
}

.parent-menu::after {
    content: "▼";
    font-size: 12px;
    position: absolute;
    right: 20px;
    top: 14px;
    transition: transform 0.3s;
}

.parent-menu.expanded::after {
    transform: rotate(180deg);
}